import request from '@/utils/request'

// 查询药品采购计划列表 (分页)
export function selectPageDrugPurchasingPlan(query) {
  return request({
    url: '/drug/drugPurchasingPlan/selectPage',
    method: 'get',
    params: query
  })
}

// 根据采购时间分组统计数量 (分页)
export function getDrugPurchasingPlanGroupByPage(query) {
  return request({
    url: '/drug/drugPurchasingPlan/getDrugPurchasingPlanGroupByPage',
    method: 'get',
    params: query
  })
}

// 查询药品采购计划列表 (不分页)
export function listDrugPurchasingPlan(query) {
  return request({
    url: '/drug/drugPurchasingPlan/list',
    method: 'get',
    params: query
  })
}

// 查询药品采购计划详细
export function getDrugPurchasingPlan(drugPurchasingPlanId) {
  return request({
    url: '/drug/drugPurchasingPlan/' + drugPurchasingPlanId,
    method: 'get'
  })
}

// 新增药品采购计划
export function addDrugPurchasingPlan(data) {
  return request({
    url: '/drug/drugPurchasingPlan',
    method: 'post',
    data: data
  })
}

// 修改药品采购计划
export function updateDrugPurchasingPlan(data) {
  return request({
    url: '/drug/drugPurchasingPlan',
    method: 'put',
    data: data
  })
}

// 删除药品采购计划
export function delDrugPurchasingPlan(drugPurchasingPlanId) {
  return request({
    url: '/drug/drugPurchasingPlan/' + drugPurchasingPlanId,
    method: 'delete'
  })
}


// 删除药品采购计划根据采购计划编号
export function delPurchasingPlanNo(purchasingPlanNo) {
  return request({
    url: '/drug/drugPurchasingPlan/delPurchasingPlanNo/' + purchasingPlanNo,
    method: 'delete'
  })
}
